get current user email wordpress

60

get current user email wordpress -

global $current_user;
get_currentuserinfo();
echo $current_user->user_email;

wordpress get user id by email -

$user = get_user_by( 'email', '[email protected]' );
$userId = $user->ID;

Comments

Submit
0 Comments